3.2.90 \(\int \frac {\cot (a+i \log (x))}{x} \, dx\) [190]

Optimal. Leaf size=14 \[ -i \log (\sin (a+i \log (x))) \]

[Out]

-I*ln(sin(a+I*ln(x)))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {3556} \begin {gather*} -i \log (\sin (a+i \log (x))) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[a + I*Log[x]]/x,x]

[Out]

(-I)*Log[Sin[a + I*Log[x]]]

Rule 3556

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\cot (a+i \log (x))}{x} \, dx &=\text {Subst}(\int \cot (a+i x) \, dx,x,\log (x))\\ &=-i \log (\sin (a+i \log (x)))\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 25, normalized size = 1.79 \begin {gather*} -i (\log (\cos (a+i \log (x)))+\log (\tan (a+i \log (x)))) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[a + I*Log[x]]/x,x]

[Out]

(-I)*(Log[Cos[a + I*Log[x]]] + Log[Tan[a + I*Log[x]]])

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 17, normalized size = 1.21

method result size
derivativedivides \(\frac {i \ln \left (\cot ^{2}\left (a +i \ln \left (x \right )\right )+1\right )}{2}\) \(17\)
default \(\frac {i \ln \left (\cot ^{2}\left (a +i \ln \left (x \right )\right )+1\right )}{2}\) \(17\)
risch \(-i \ln \left (x \right )-2 a -i \ln \left (\frac {{\mathrm e}^{2 i a}}{x^{2}}-1\right )\) \(25\)
norman \(-i \ln \left (\tan \left (a +i \ln \left (x \right )\right )\right )+\frac {i \ln \left (1+\tan ^{2}\left (a +i \ln \left (x \right )\right )\right )}{2}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a+I*ln(x))/x,x,method=_RETURNVERBOSE)

[Out]

1/2*I*ln(cot(a+I*ln(x))^2+1)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 10, normalized size = 0.71 \begin {gather*} -i \, \log \left (\sin \left (a + i \, \log \left (x\right )\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x,x, algorithm="maxima")

[Out]

-I*log(sin(a + I*log(x)))

________________________________________________________________________________________

Fricas [A]
time = 2.73, size = 18, normalized size = 1.29 \begin {gather*} -i \, \log \left (x^{2} - e^{\left (2 i \, a\right )}\right ) + i \, \log \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x,x, algorithm="fricas")

[Out]

-I*log(x^2 - e^(2*I*a)) + I*log(x)

________________________________________________________________________________________

Sympy [A]
time = 0.15, size = 17, normalized size = 1.21 \begin {gather*} i \log {\left (x \right )} - i \log {\left (x^{2} - e^{2 i a} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*ln(x))/x,x)

[Out]

I*log(x) - I*log(x**2 - exp(2*I*a))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (10) = 20\).
time = 0.43, size = 75, normalized size = 5.36 \begin {gather*} -i \, \log \left (\frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {{\left (\frac {{\left ({\left | x \right |}^{2} + 1\right )}^{2}}{{\left | x \right |}^{2}} - \frac {{\left ({\left | x \right |}^{2} - 1\right )}^{2}}{{\left | x \right |}^{2}}\right )} \cos \left (\pi \mathrm {sgn}\left (x\right ) + 2 \, a\right ) + \frac {{\left ({\left | x \right |}^{2} + 1\right )}^{2}}{{\left | x \right |}^{2}} + \frac {{\left ({\left | x \right |}^{2} - 1\right )}^{2}}{{\left | x \right |}^{2}}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(a+I*log(x))/x,x, algorithm="giac")

[Out]

-I*log(1/2*sqrt(1/2)*sqrt(((abs(x)^2 + 1)^2/abs(x)^2 - (abs(x)^2 - 1)^2/abs(x)^2)*cos(pi*sgn(x) + 2*a) + (abs(
x)^2 + 1)^2/abs(x)^2 + (abs(x)^2 - 1)^2/abs(x)^2))

________________________________________________________________________________________

Mupad [B]
time = 2.25, size = 21, normalized size = 1.50 \begin {gather*} -\ln \left (x^2-{\mathrm {e}}^{a\,2{}\mathrm {i}}\right )\,1{}\mathrm {i}+\ln \left (x\right )\,1{}\mathrm {i} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(a + log(x)*1i)/x,x)

[Out]

log(x)*1i - log(x^2 - exp(a*2i))*1i

________________________________________________________________________________________